package com.ruoyi.community.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户对象 user
 * 
 * @author lj
 * @date 2022-02-22
 */
@ApiModel(value = "用户表")
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    @ApiModelProperty(value = "ID")
    private Long id;

    /** 用户名 */
    @ApiModelProperty(value = "用户名")
    @Excel(name = "用户名")
    private String username;

    /** 密码 */
    @ApiModelProperty(value = "密码")
    private String password;

    /** 性别 */
    @ApiModelProperty(value = "性别,字典:sys_user_sex")
    @Excel(name = "性别")
    private Long sex;

    /** 生日 */
    @ApiModelProperty(value = "生日")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthday;

    /** 用户类型 0业主 1家属  2租客 3访客 */
    @ApiModelProperty(value = "用户类型,字典:user_type")
    @Excel(name = "用户类型")
    private Integer type;

    /** 昵称 */
    @ApiModelProperty(value = "昵称")
    @Excel(name = "昵称")
    private String nickname;

    /** 手机号 */
    @ApiModelProperty(value = "手机号")
    @Excel(name = "手机号")
    private String phonenumber;

    /** 头像 */
    @ApiModelProperty(value = "头像")
    @Excel(name = "头像")
    private String avatar;

    /** wxopenid */
    @ApiModelProperty(value = "wxopenid")
    private String weixinOpenid;

    /** 身份证 */
    @ApiModelProperty(value = "身份证")
    @Excel(name = "身份证")
    private String identityCard;

    /** 用户状态  0 可用, 1 禁用, 2 注销 */
    @ApiModelProperty(value = "用户状态,字典:wxuser_status")
    @Excel(name = "用户状态")
    private Integer status;

    /** 删除标志（0代表存在 2代表删除） */
    @ApiModelProperty(value = "删除标志")
    private Integer delFlag;

    /** 创建时间 */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date creatTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setSex(Long sex) 
    {
        this.sex = sex;
    }

    public Long getSex() 
    {
        return sex;
    }
    public void setBirthday(Date birthday) 
    {
        this.birthday = birthday;
    }

    public Date getBirthday() 
    {
        return birthday;
    }
    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setNickname(String nickname) 
    {
        this.nickname = nickname;
    }

    public String getNickname() 
    {
        return nickname;
    }
    public void setPhonenumber(String phonenumber) 
    {
        this.phonenumber = phonenumber;
    }

    public String getPhonenumber() 
    {
        return phonenumber;
    }
    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }
    public void setWeixinOpenid(String weixinOpenid) 
    {
        this.weixinOpenid = weixinOpenid;
    }

    public String getWeixinOpenid() 
    {
        return weixinOpenid;
    }
    public void setIdentityCard(String identityCard) 
    {
        this.identityCard = identityCard;
    }

    public String getIdentityCard() 
    {
        return identityCard;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setDelFlag(Integer delFlag) 
    {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() 
    {
        return delFlag;
    }
    public void setCreatTime(Date creatTime) 
    {
        this.creatTime = creatTime;
    }

    public Date getCreatTime() 
    {
        return creatTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("sex", getSex())
            .append("birthday", getBirthday())
            .append("type", getType())
            .append("nickname", getNickname())
            .append("phonenumber", getPhonenumber())
            .append("avatar", getAvatar())
            .append("weixinOpenid", getWeixinOpenid())
            .append("identityCard", getIdentityCard())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("creatTime", getCreatTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
